package com.hxb.maildemo;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author HXB
 * @Title:
 * @Description:
 * @date 2020-11-11 16:54
 */
@Slf4j
@RestController
@RequestMapping(value = "UI")
@Api(value = "前台", tags = {"前台接口"})
public class MyController {


    @Autowired
    private EmailService emailService;

    @ApiOperation(value = "测试邮件", notes = "测试邮件", httpMethod = "POST")
    @RequestMapping(value = "email", method = RequestMethod.POST)
    public String email(@RequestBody String user) {
        emailService.sendemail("七言修改密码","1219382277@qq.com",
                "h690005203@live.com","你的密码修改成功，用户名：" + "h690005203@live.com");
        return "发送中";
    }



}
